package shop.up.item.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import shop.up.common.result.Result;
import shop.up.item.client.impl.ItemDegradeFeignClient;

import java.util.Map;

/**
 * @author zzc
 * @date 2023/4/2 17:34
 */
@FeignClient(value = "service-item", fallback = ItemDegradeFeignClient.class)
public interface ItemFeignClient {

    /**
     * 获取sku详情信息
     *
     * @param skuId
     * @return
     */
    @GetMapping("api/item/{skuId}")
    Result<Map<String,Object>> getItem(@PathVariable("skuId") Long skuId);
}
